package com.mew.chess.core.game.qmcs.game.message;

import com.mew.chess.core.game.qmcs.game.common.QmcsBO;
import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.*;

@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class QmcsPushMessage extends ZebraBaseMessage<QmcsPushMessage> {


    private QmcsBO[] qmcsBOS;

    @Override
    public void write(ByteBuf byteBuf) {

        writeInt(byteBuf, qmcsBOS.length);
        for (QmcsBO qmcsBO : qmcsBOS) {
            qmcsBO.write(byteBuf);
        }
    }


    @Override
    public QmcsPushMessage read(ByteBuf byteBuf) {
        return null;
    }
}
